app: Only remount /sysroot if needed
authorJonathan Lebon <jonathan@jlebon.com>
Fri, 19 Nov 2021 15:44:03 +0000 (10:44 -0500)
committerJonathan Lebon <jonathan@jlebon.com>
Fri, 19 Nov 2021 16:01:18 +0000 (11:01 -0500)
commit947acbf178152f860d3d8f9896b2ce51645419f6
tree75d36604b332137eff08f1a64ec87ee8f0907c7c
parentf552e30c0bb8096ca21dc3f7723c9828e4ef3e5c
app: Only remount /sysroot if needed

We should only try to remount `/sysroot` if we're actually handling the
sysroot repo and the repo isn't writable. We already have public APIs to
check each of those, so let's use them.

Closes: #2485
src/ostree/ot-main.c